<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>登录页</title>
  <style>
    html {
      height: 100%;
    }
    body{
      height: 100%;
      margin: 0;
    }
    main{
      height: 100%;
      display: flex;
    }
    .left{
      width: 100%;
      height: 100%;
      background-image: url("/88.jpg");
      background-size: 160%;
      background-position: center left;
      display: flex;
    }
    .left>div{
      width: 100%;
      height: 100%;
      background-color: RGBA(150,150,150,0.5);
      display: flex;
    }
    .left h1 {
      font-size: 50px;
      font-weight: 100;
      color: #ffffff;
      display: flex;
      align-items: center;
      margin-left: 100px;
    }
    .right {
      width: 30%;
      height: 100%;
      flex-shrink: 0;
      display: flex;
      justify-content: center;
      align-items: center;
    }
    .right >div{
      width: 350px;
      height: 400px;
      text-align: center;
    }
    .DLK{
      width: 300px;
      height: 60px;
      border: 2px solid #2196f3;
      border-radius: 5px;
    }
    .MMK{
      width: 300px;
      height: 60px;
      border: 2px solid #2196f3;
      border-radius: 5px;
    }
    input{
      box-sizing: border-box;
      margin-top: 40px;
      font-size: 25px;
      padding-left: 10px;
    }
    button{
      width: 300px;
      height: 60px;
      background-color: deepskyblue;
      border: 0;
      color: white;
      font-size: 20px;
      margin-top: 40px;
      outline: none;
      border-radius: 5px;
    }
  </style>
</head>
<body>
  <main>
    <div class="left">
      <div>
        <h1>湘味湘品运营平台</h1>
      </div>
    </div>
    <div class="right">
      <div>
        <h2>系统登录/LOGIN IN</h2>
        <div><input class="DLK" placeholder='请输入用户名'></div>
        <div><input class="MMK" placeholder='请输入密码' type="password"></div>
        <button>登&nbsp&nbsp&nbsp&nbsp录</button>
      </div>
    </div>
  </main>
  <script src="/ajax.js"></script>
  <script>
    let button=document.querySelector('button')
    button.addEventListener('click',function () {
      let DLK=document.querySelector('.DLK').value.trim()
      if(DLK==''){
        alert('请输入用户名')
        return
      }
      let MMK=document.querySelector('.MMK').value.trim()
      if(MMK==''){
        alert('请输入密码')
        return
      }
      wz('/api/system/login',{
        username:document.querySelector('.DLK').value,
        password:document.querySelector('.MMK').value
      },function (result) {
        console.log(result)
        alert('登录成功，跳转到首页')
        window.location.href='/代码存放git.html'
      })
    })
  </script>
</body>
</html>